#pragma once
#include "ENUM.h"
#include "Definitions.h"

class Command
{
public:
	Command();
public:
	//comms
	void	Pack(char* buffer);
	void	unPack(char* data);
	inline void	setGameNumber(int a_gameNumber)	{m_gameNumber = a_gameNumber;}
public:
	//everything else
	void	encode(CMD_TYPE a_type, int a_value, char* a_string);
	inline CMD_TYPE		getCmdType()	{return m_type;}
	inline int			getValue()		{return m_value;}
	inline char*		getString()		{return m_string;}
	inline int			getGameNumber()	{return m_gameNumber;}
private:
	CMD_TYPE	m_type;
	int			m_value, m_gameNumber;
	char		m_string[DEFAULT_BUFLEN];
private:
	int ParseString(int start, char* buffer, char* data, char stop);
};